package com.zhangbaiyan.test01;

import java.util.concurrent.Callable;

/**
 * @author zhangbaiyan
 * @date 2024-09-23 10:10
 * @description:
 * @version:
 */
public class MyCallable implements Callable<Integer> {

    @Override
    public Integer call() throws Exception {
        //求1～100之间的和
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum += i;
        }
        return sum;
    }
}
